package com.sbeam.service;

import com.sbeam.mapper.RightsMapper;
import com.sbeam.pojo.Rights;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RightsServiceImpl implements RightsService{

    @Autowired
    private RightsMapper rightsMapper;

    @Override
    public List<Rights> getRightsList(Integer level) {
        if (level == 0){
            return rightsMapper.getRightsList(null);
        }
        return rightsMapper.getRightsList(level);
    }
}
